 <?php
/**
* @version		$Id$ $Revision$ $Date$ $Author$ $
* @package		Restaurantmanage
* @subpackage 	Controllers
* @copyright	Copyright (C) 2014, Hoang Yen. All rights reserved.
* @license #http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/

// no direct access
defined('_JEXEC') or die('Restricted access');

jimport('joomla.application.component.controller');

/**
 * RestaurantmanageZdish Controller
 *
 * @package    Restaurantmanage
 * @subpackage Controllers
 */
class RestaurantmanageControllerZdish extends JControllerLegacy
{
		function addElement()
		{
			$app = JFactory::getApplication();
			$jinput = $app->input;

			$zdish = $this->getModel('zdish');
			$resultInsert  = $zdish->getInsertElement();
			
			// Get Parameters
			$dish_id = $jinput->get('dish_id', null, 'INT');
			$url = JRoute::_('index.php?option=com_restaurantmanage&view=zdish&id=' . $dish_id, false);
			$app->redirect($url);
		}
		
		function addDish()
		{
			$app = JFactory::getApplication();
			$jinput = $app->input;
		
			$zdish = $this->getModel('zdish');
			$resultInsert  = $zdish->getInsertDish();
				
			// Get Parameters
			$url = JRoute::_('index.php?option=com_restaurantmanage&view=' . $jinput->get('view', null, 'CMD'), false);
			$app->redirect($url);
		}
		
}// class
?>